fix(windows-installer): UseSetupLdr=no so Smart App Control can't block it#331
Closed
BitHighlander wants to merge 1 commit into
Closed
fix(windows-installer): UseSetupLdr=no so Smart App Control can't block it#331BitHighlander wants to merge 1 commit into
BitHighlander wants to merge 1 commit into
Conversation
…ck it The default single-exe Inno installer self-extracts an UNSIGNED setup.tmp engine to %TEMP% and runs it. Smart App Control (on by default on many Win11 machines) blocks unsigned code, so v1.4.11 died with "Setup failed to initialize" (exit 1, CodeIntegrity 3077/3033) and installed nothing. The EV signature on the outer setup.exe doesn't help — SAC evaluates the extracted setup.tmp on its own, and stock Inno can't sign it. The app binaries themselves are all EV-signed and SAC-clean; only the installer's extracted stub was the problem. Fix: - installer.iss: UseSetupLdr=no -> no setup.tmp; the signed setup.exe is the engine and runs in-process, so SAC only sees the signed exe. Inno now emits setup.exe + setup-*.bin. - build-windows-production.ps1: zip the parts into KeepKey-Vault-<ver>-win-x64-setup.zip and delete the loose exe/bin so a bare (SAC-blocked) single exe can't be shipped by accident. - docs: WINDOWS-BUILD-AND-SIGN.md gains a "Smart App Control" section and a MANDATORY "install under SAC (Enforce)" checklist item — SAC-off machines are an invalid test, which is how this slipped through (1.4.7 smoke test was SAC-off). Full write-up in docs/incidents/. Validated on a SAC-Enforce machine via the real download flow (zip + MotW -> extract -> run setup.exe): exit 0, version 1.4.11, no 3077/3033, app boots. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Postmortem fix for the 1.4.11 Windows installer, which failed to launch on any machine with Smart App Control (SAC) enabled. Ports the fix already on
release/1.4.11(35c89547).Root cause
A default single-exe Inno installer self-extracts an unsigned
setup.tmpengine to%TEMP%and runs it. SAC (default-on for many Win11 installs) blocks unsigned code → "Setup failed to initialize" (exit 1, CodeIntegrity 3077/3033), nothing installs. The EV signature on the outersetup.exedoesn't help — SAC evaluates the extractedsetup.tmpindependently and stock Inno can't sign it. The app binaries are all EV-signed and SAC-clean; only the installer's stub was the problem.Fix
installer.iss:UseSetupLdr=no→ nosetup.tmp; the signedsetup.exeis the engine, runs in-process, SAC only sees the signed exe. Inno emitssetup.exe+setup-*.bin.build-windows-production.ps1: zips the parts intoKeepKey-Vault-<ver>-win-x64-setup.zipand deletes the loose exe/bin so a bare (SAC-blocked) single-exe can't ship by accident.WINDOWS-BUILD-AND-SIGN.mdgains a "Smart App Control" section + a mandatory "install under SAC (Enforce)" checklist item (SAC-off machines are an invalid test — that's how it slipped through: the 1.4.7 smoke test was SAC-off). Full write-up indocs/incidents/1.4.11-smart-app-control-installer-block.md.Validation
On a SAC-Enforce machine, real download flow (zip + Mark-of-the-Web → extract → run
setup.exe): installer exit 0, version → 1.4.11, no 3077/3033, app boots (+869ms: boot complete).v1.4.11re-shipped as the.zip; broken.exeremoved.Follow-ups (not in this PR)
.zip(extract → runsetup.exe), not a.exe..zipis a UX regression vs a one-click.exe. Evaluate NSIS (in-process, single signed exe, SAC-clean) or MSIX/MSI to restore a single downloadable file.🤖 Generated with Claude Code